#ifndef __IPARASE_CALLBACK_TO_FORWARDER_H_INCLUDED__
#define __IPARASE_CALLBACK_TO_FORWARDER_H_INCLUDED__

#include "packet_handler.h"

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

template <class T>
void swap(T& a, T& b){
	T c = a;
	a = b;
	b = c;
}

#ifdef __cplusplus
extern "C" {
#endif

class packet_handler_forward : public packet_handler{

public:

	virtual void on_handle_ip(iphdr* ptr_ip);

	virtual void on_handle_tcp(iphdr* ptr_ip, tcphdr* ptr_tcp);

	virtual void on_handle_udp(iphdr* ptr_ip, udphdr* ptr_udp);
};

#ifdef __cplusplus
}
#endif

#endif // __IPARASE_CALLBACK_TO_FORWARDER_H_INCLUDED__
